<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<script type="text/javascript">
	function openAddress(){
	var name = document.getElementById("name").value;
	if(name==""){
		alert("名称不能为空");
		return false;
	}else{		
		return true;
	}
}
	function validate(){
		alert("您所输入的通讯组名已经存在");
		location.href="message/add.jsp";
	}
	
	
</script>
   <head>
  
    
    <title>新增通讯组</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<link rel="stylesheet" href="css/message_css.css" type="text/css"></link>
  <script type="text/javascript" src="js/javascript.js"></script></head>
  
  <s:if test="list.size()!=0">
  	<body onload="validate()"></body>
  </s:if>
  <s:else>
  
  <body>
    <form action="../add" method="post">
    	<table width="100%" cellpadding="0" cellspacing="0">
    		<tr height="35" class="colors">
    			<td colspan="2" background="images/bg_03.gif">
    		&nbsp;&nbsp;	<img src="../images/index_32.gif"></img>&nbsp;通讯组管理
    			</td>    			
    		</tr>
    		<tr>
    		
    			<td class="td_01">&nbsp;通讯组</td>
    			<td class="td_01">
    				<input type="text" name="name" id="name" size="50"/>
    			</td>
    		</tr>
    		<tr>
    			<td class="td_01">&nbsp;描述</td>
    			<td class="td_01"><textarea name="desc" cols="50" rows="15"></textarea></td>
    		</tr>
    		<tr>
    			<td colspan="2" align="center" class="td_01">
    				<input type="submit" value="新增" onclick="return openAddress()" class="buttonface02">&nbsp;&nbsp;&nbsp;&nbsp;
    				<input type="button" value="取消" class="buttonface02" onclick="location.href='listAddress'">
    			</td>  
    		</tr>
    	</table>
    </form>
  </body>
  </s:else>
</html>
